
using Qdb.Config;
using QdbUnit;
using QdbUnit.Extensions;

namespace Qdb.Tests.CLI1
{
	public class ProtectedBaseConstructorTestCase : AbstractQdbTestCase
	{
		public class Base
		{
			protected Base()
			{
			}
		}

		public class Derived : Base
		{
		}

		protected override void Configure(IConfiguration config)
		{
			config.CallConstructors(true);
		}

		protected override void Store()
		{
			Store(new Derived());
		}

		public void TestClassesWithProtectedBaseConstructorAreReturned()
		{
			Assert.IsNotNull(RetrieveOnlyInstance(typeof(Derived)));
			Assert.IsNotNull(RetrieveOnlyInstance(typeof(Base)));
		}
	}
}
